home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / thor / examples / confdata.br < prev    next >
Text File  |  1996-11-10  |  7KB  |  126 lines

  1. /*  ConfData.br
  2.  *
  3.  *  Shows all data about a conference.
  4.  *  
  5.  *  Script by: Eivind Nordseth, Ultima Thule Software.
  6.  */
  7.  
  8. /*    trace results */
  9.  
  10.     if ~show('p', 'BBSREAD') then do
  11.         address command
  12.             "run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
  13.             "WaitForPort BBSREAD"
  14.     end
  15.  
  16.     address "BBSREAD"
  17.  
  18.     parse arg argument
  19.  
  20.     if(argument = '') then
  21.     do
  22.         say '$VER: ConfData.br 4.1 (08.08.95)'
  23.         say 'Template: BBSNAME/A,CONFNAME/A'
  24.         exit
  25.     end
  26.  
  27.     /* Bit numbers for conference data */
  28.  
  29.     CDB_MEMBER_OF           = 0   /* Member of this conference. */
  30.     CDB_MAIL                = 1   /* Private mail conference. */
  31.     CDB_READ_ONLY           = 2   /* Read only conference. */
  32.     CDB_COMPULSORY          = 3   /* Compulsory conference. */
  33.     CDB_FILE_INFO           = 4   /* File info conference. */
  34.     CDB_USER_INFO           = 5   /* User info conference. */
  35.     CDB_PRIVATE_ALLOWED     = 6   /* Private messages allowed. */
  36.     CDB_ENTER_ONLY_TO_ALL   = 7   /* Enter only allowed to ALL. */
  37.     CDB_ALIAS               = 8   /* Alias conference. */
  38.     CDB_BBS_KEEPMSG         = 9   /* Use bbs KeepMsg. */
  39.     CDB_BBS_KEEPTIME        = 10  /* Use bbs KeepTime. */
  40.     CDB_IGNORE_KEEPMSG      = 11  /* Don't count messages when packing conference. */
  41.     CDB_IGNORE_KEEPTIME     = 12  /* Don't check time when packing conference. */
  42.     CDB_NO_XPK_METHOD       = 13  /* Don't use any xpk method. */
  43.     CDB_NO_SIGNATURE        = 14  /* Don't use signatures. */
  44.     CDB_NOT_ON_BBS          = 15  /* This conference is not on the bbs. */
  45.     CDB_NO_TAGS             = 16  /* Don't use tags. */
  46.     CDB_REPLY_ONLY_TO_ALL   = 17  /* Replies should be adresses to all. */ 
  47.     CDB_NO_LINEWRAP_DISPLAY = 18  /* Don't line wrap messages in this conference when they are displayed. */
  48.     CDB_FILE_SIGNATURE      = 19  /* The Signature field contains the path and name of a file containing the signature. */
  49.     CDB_AUTO_XPK_PACK       = 20  /* Automatically xpk pack new messages when they are written to this conference. NB: A xpk method must have been defined. */
  50.     CDB_NO_AUTO_XPK_PACK    = 21  /* No automatically xpk packing in this conference. */
  51.     CDB_MARK_OWN_MSGS       = 22  /* Also mark messages from user when adding messages. */
  52.     CDB_COMMAND_SIGNATURE   = 23  /* The signature field contains the path and name of a command. When the command is executed should the signature contents be written to stdout. The template for the command is expected to be BBSNAME/K,CONFNAME/K. */
  53.     CDB_REFLOW_QUOTING      = 24  /* Reflow quoting should be on as default when answering messages. This flag should only be considered when cd_QuoteType is != QT_USE_SUPER. */
  54.     CDB_ALWAYS_REPLY_STR    = 25  /* Use reply string on all replies. This flag should only be considered when cd_ReplyString is non NULL. */
  55.     CDB_NO_REPLY_STR        = 26  /* Don't use reply strings in this conf. Overrides the setting of cd_ReplyString. */
  56.     CDB_BBS_REPLY_STR       = 27  /* Use bbs reply string settings. Overrides all other conference reply string settings. */
  57.     CDB_NO_CONF_ENTER_SCR   = 28  /* Don't use a conference enter script in this conference. */
  58.     CDB_NO_CONF_LEAVE_SCR   = 29  /* Don't use a conference leave script on this conference. */
  59.  
  60.     GETCONFDATA argument stem CONFDATA
  61.     if(rc ~= 0) then 
  62.     do
  63.         say BBSREAD.LASTERROR
  64.         exit
  65.     end
  66.  
  67.     say 'Name:       ' CONFDATA.NAME
  68.     say 'KeepMsg:    ' CONFDATA.KEEPMSG
  69.     say 'KeepTime:   ' CONFDATA.KEEPTIME
  70.     say 'Signature:  ' CONFDATA.SIGNATURE
  71.     say 'Alias:      ' CONFDATA.ALIAS
  72.     say 'BBSConfNr:  ' CONFDATA.BBSCONFNR
  73.     say 'LineLength: ' CONFDATA.LINELENGTH
  74.     say 'CharSet:    ' CONFDATA.CHARSET
  75.     say 'XPKMethod:  ' CONFDATA.XPKMETHOD
  76.     say 'TagFile:    ' CONFDATA.TAGFILE
  77.     say 'EMailAddr:  ' CONFDATA.EMAILADDR
  78.     say 'ReplyString:' CONFDATA.REPLYSTRING
  79.     say 'QuoteType:  ' CONFDATA.QUOTETYPE
  80.     say 'QuoteChars: ' CONFDATA.QUOTECHARS
  81.     say 'EnterScript:' CONFDATA.ENTERSCRIPT
  82.     say 'LeaveScript:' CONFDATA.LEAVESCRIPT
  83.     say 'ConfNetType:' CONFDATA.CONFNETTYPE
  84.  
  85.     cf = ''
  86.     if bittst(CONFDATA.FLAGS,CDB_MEMBER_OF)           then cf = cf || 'MEMBER_OF '
  87.     if bittst(CONFDATA.FLAGS,CDB_MAIL)                then cf = cf || 'MAIL '
  88.     if bittst(CONFDATA.FLAGS,CDB_READ_ONLY)           then cf = cf || 'READ_ONLY '
  89.     if bittst(CONFDATA.FLAGS,CDB_COMPULSORY)          then cf = cf || 'COMPULSORY '
  90.     if bittst(CONFDATA.FLAGS,CDB_FILE_INFO)           then cf = cf || 'FILE_INFO '
  91.     if bittst(CONFDATA.FLAGS,CDB_USER_INFO)           then cf = cf || 'USER_INFO '
  92.     if bittst(CONFDATA.FLAGS,CDB_PRIVATE_ALLOWED)     then cf = cf || 'PRIVATE_ALLOWED '
  93.     if bittst(CONFDATA.FLAGS,CDB_ENTER_ONLY_TO_ALL)   then cf = cf || 'ENTER_ONLY_TO_ALL '
  94.     if bittst(CONFDATA.FLAGS,CDB_ALIAS)               then cf = cf || 'ALIAS '
  95.     if bittst(CONFDATA.FLAGS,CDB_BBS_KEEPMSG)         then cf = cf || 'BBS_KEEPMSG '
  96.     if bittst(CONFDATA.FLAGS,CDB_BBS_KEEPTIME)        then cf = cf || 'BBS_KEEPTIME '
  97.     if bittst(CONFDATA.FLAGS,CDB_IGNORE_KEEPMSG)      then cf = cf || 'IGNORE_KEEPMSG '
  98.     if bittst(CONFDATA.FLAGS,CDB_IGNORE_KEEPTIME)     then cf = cf || 'IGNORE_KEEPTIME '
  99.     if bittst(CONFDATA.FLAGS,CDB_NO_XPK_METHOD)       then cf = cf || 'NO_XPK_METHOD '
  100.     if bittst(CONFDATA.FLAGS,CDB_NO_SIGNATURE)        then cf = cf || 'NO_SIGNATURE '
  101.     if bittst(CONFDATA.FLAGS,CDB_NOT_ON_BBS)          then cf = cf || 'NOT_ON_BBS '
  102.     if bittst(CONFDATA.FLAGS,CDB_NO_TAGS)             then cf = cf || 'NO_TAGS '
  103.     if bittst(CONFDATA.FLAGS,CDB_REPLY_ONLY_TO_ALL)   then cf = cf || 'REPLY_ONLY_TO_ALL '
  104.     if bittst(CONFDATA.FLAGS,CDB_NO_LINEWRAP_DISPLAY) then cf = cf || 'NO_LINEWRAP_DISPLAY '
  105.     if bittst(CONFDATA.FLAGS,CDB_FILE_SIGNATURE)      then cf = cf || 'FILE_SIGNATURE '
  106.     if bittst(CONFDATA.FLAGS,CDB_AUTO_XPK_PACK)       then cf = cf || 'AUTO_XPK_PACK '
  107.     if bittst(CONFDATA.FLAGS,CDB_NO_AUTO_XPK_PACK)    then cf = cf || 'NO_AUTO_XPK_PACK '
  108.     if bittst(CONFDATA.FLAGS,CDB_MARK_OWN_MSGS)       then cf = cf || 'MARK_OWN_MSGS '
  109.     if bittst(CONFDATA.FLAGS,CDB_COMMAND_SIGNATURE)   then cf = cf || 'COMMAND_SIGNATURE '
  110.     if bittst(CONFDATA.FLAGS,CDB_REFLOW_QUOTING)      then cf = cf || 'REFLOW_QUOTING '
  111.     if bittst(CONFDATA.FLAGS,CDB_ALWAYS_REPLY_STR)    then cf = cf || 'ALWAYS_REPLY_STR '
  112.     if bittst(CONFDATA.FLAGS,CDB_NO_REPLY_STR)        then cf = cf || 'NO_REPLY_STR '
  113.     if bittst(CONFDATA.FLAGS,CDB_BBS_REPLY_STR)       then cf = cf || 'BBS_REPLY_STR '
  114.     if bittst(CONFDATA.FLAGS,CDB_NO_CONF_ENTER_SCR)   then cf = cf || 'NO_CONF_ENTER_SCR '
  115.     if bittst(CONFDATA.FLAGS,CDB_NO_CONF_LEAVE_SCR)   then cf = cf || 'NO_CONF_LEAVE_SCR '
  116.  
  117.     do w=4 to words(cf) by 4
  118.         cf    = subword(cf, 1, w) || '0a'x || '             ' || subword(cf, w + 1)
  119.     end
  120.     say 'Flags:      ' cf
  121.     say 'FirstMsg:   ' CONFDATA.FIRSTMSG
  122.     say 'LastMsg:    ' CONFDATA.LASTMSG
  123.     say 'NumMessages:' CONFDATA.NUMMESSAGES
  124.     say 'MsgMarked:  ' CONFDATA.MSGMARKED
  125.     say 'Marked2User:' CONFDATA.MARKED2USER
  126.